package com.smile67.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author smile67
 * @since 2023-09-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@Accessors(chain = true)
@TableName("table_employee")
@ApiModel(value="Employee对象", description="")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键 ")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "姓名 ")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "用户名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "密码 ")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "手机号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "性别 ")
    @TableField("sex")
    private String sex;

    @ApiModelProperty(value = "身份证号")
    @TableField("id_number")
    private String idNumber;

    @ApiModelProperty(value = "头像 ")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(value = "状态 0：禁用 1：启用 ")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建时间 ")
    @TableField(value = "create_time",fill = FieldFill.INSERT)//插入时填充字段
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间 ")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)//插入和更新时填充字段
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建人 ")
    @TableField(value = "create_user",fill = FieldFill.INSERT)//插入时填充字段
    private Long createUser;

    @ApiModelProperty(value = "修改人 ")
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)//插入和更新时填充字段
    private Long updateUser;


}
